<?php

/* 
 * 标题
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class storyTitleModel extends db_help
{
    public $keyFields = 'tid';//设置主键
    public function __construct() {
        parent::__construct();
        $this->table_name = $this->table('story_title');
    }
    public static function load(){
        return new self();
    }
    /**
     * 获取名称的
     * @param type $tid
     * @return type
     */
    public function getName($tid) {
        $where = array(
            'tid' => $tid,
        );
        return $this->getOne('tname', $where);
    }

    public function getMid($mid) {
        $where = array(
            'mid' => $mid,
        );
        return $this->getOne('mid', $where);
    }
}

